import request from '@/utils/request'
// 工单状态
export const allTaskStatusApi = () =>
  request({
    url: '/api/task-service/task/allTaskStatus'
  })
// 工单类型
export const allTaskApi = () =>
  request({
    url: '/api/task-service/taskType/list'
  })
// 工单搜索
export const search = (data) =>
  request({
    url: '/api/task-service/task/search',
    params: data
  })
// 人员搜索
export const userSearch = (data) =>
  request({
    url: '/api/user-service/user/search',
    params: data
  })
// 运营人员名单
export const operatorList = (data) =>
  request({
    url: '/api/user-service/user/operatorList'
  })
// 工单详情
export const taskInfo = (data) =>
  request({
    url: `/api/task-service/task/taskInfo/${data}`
  })
// 取消订单
export const cancelOrder = (data) =>
  request({
    url: `/api/task-service/task/cancel/${data.taskId}`,
    method: 'post',
    data
  })
// 维修人员列表
export const register = (data) => request({
  url: `/api/user-service/user/repairerList/${data}`
})

